package p2shapesv2;

public class Shape {
	private float perimeter = 0;
	private float area      = 0;
	
	public Shape(){
		area = perimeter = 0;
	}

	public Shape( float p, float a ){
		if ( a >= 0 )
			area = a;
		if ( p >= 0 )
			perimeter = p;
	}

	public float getPerimeter(){
		return perimeter;
	}
	
	public void setPerimeter( float p){
		if (p >= 0)
			perimeter = p;
	}

	public float getArea(){
		return area;
	}
	
	public void setArea( float a){
		if (a >= 0)
			area = a;
	}

	public String toString(){
		return " area: " + area + ", and perimeter: " + perimeter;
	}
}
